//
//  PublicClass.h
//  e律师
//
//  Created by 韦淋 on 2017/5/18.
//  Copyright © 2017年 test. All rights reserved.
//

#ifndef PublicClass_h
#define PublicClass_h

#define Screen [UIScreen mainScreen].bounds.size
#define H 667.0 * Screen.height
#define W 375.0 * Screen.width


//颜色
#define  GetColor(red,Green,Blue,Alpha) [UIColor colorWithRed:red/255.0 green:Green/255.0 blue:Blue/255.0 alpha:Alpha]
//宽高
#define MAINSCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define MAINSCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define MAINSCREEN_X [UIScreen mainScreen].bounds.origin.x
#define MAINSCREEN_Y [UIScreen mainScreen].bounds.origin.Y


#define CENTER self.view.center
#define CENTER_X self.view.center.x
#define CENTER_Y self.view.center.y

#define MID_X(x) CGRectGetMidX(x)
#define MID_Y(y) CGRectGetMidY(y)
#define MIN_X(x) CGRectGetMinX(x)
#define MIN_Y(y) CGRectGetMinY(y)
#define MAX_X(x) CGRectGetMaxX(x)
#define MAX_Y(y) CGRectGetMaxY(y)
//自适应宽高
#define ADAPTATION_WIDTH(Width) [UIScreen mainScreen].bounds.size.width * Width / 375
#define ADAPTATION_HEIGHT(Height) [UIScreen mainScreen].bounds.size.height * Height / 667
//图片
#define IMGNAME(name) [UIImage imageNamed:name]
#define IMAGE(name) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:A ofType:nil]]

//正方形控件
#define SQUARE(X,Y,WIDTH,HEIGHT) CGRectMake([UIScreen mainScreen].bounds.size.width * (X) / 414, [UIScreen mainScreen].bounds.size.height * (Y) / 736,[UIScreen mainScreen].bounds.size.width * (WIDTH) / 414,[UIScreen mainScreen].bounds.size.width * (HEIGHT) / 736)

#endif /* PublicClass_h */
